//package com.zkthink.ceres.app.shoppingcart.controller;
//
//import com.zkthink.context.BaseContextHandler;
//import com.zkthink.log.annotation.SysLog;
//import com.zkthink.security.annotation.PreAuth;
//import com.zkthink.ceres.product.dto.LogisticsSaveDTO;
//import com.zkthink.ceres.product.entity.ShoppingCartSkuVO;
//import com.zkthink.ceres.shoppingcart.service.ShoppingCartService;
//import lombok.AllArgsConstructor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import com.zkthink.base.R;
//import com.zkthink.ceres.product.service.ProductService;
//import com.zkthink.ceres.product.entity.ProductVO;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//
//import java.util.List;
//
//@Slf4j
//@Validated
//@RestController
//@RequestMapping("/shoppingcart")
//@Api(value = "购物车接口", tags = "购物车接口")
//@AllArgsConstructor
//public class ShoppingCartController {
//
//    private ShoppingCartService shoppingcartService;
//
//    @PostMapping
//    @ApiOperation("添加购物车")
//    public R<List<ShoppingCartSkuVO>> saveShoppingCart(@RequestBody ShoppingCartSkuVO shoppingCartSkuVO) {
//        Long memberId = BaseContextHandler.getUserId();
//        return shoppingcartService.saveShoppingCart(memberId, shoppingCartSkuVO);
//    }
//
//    @PutMapping
//    @ApiOperation("修改购物车")
//    public R<List<ShoppingCartSkuVO>> updateShoppingCart(@RequestBody List<ShoppingCartSkuVO> shoppingCartSkuVOList) {
//        Long memberId = BaseContextHandler.getUserId();
//        return shoppingcartService.updateShoppingCart(memberId, shoppingCartSkuVOList);
//    }
//
//    @GetMapping
//    @ApiOperation("获取购物车")
//    public R<List<ShoppingCartSkuVO>> getShoppingCart() {
//        Long memberId = BaseContextHandler.getUserId();
//        return shoppingcartService.getShoppingCart(memberId);
//    }
//
//    @DeleteMapping
//    @ApiOperation("清空购物车")
//    public R<Boolean> deleteShoppingCart() {
//        Long memberId = BaseContextHandler.getUserId();
//        return shoppingcartService.deleteShoppingCart(memberId);
//    }
//
//}
